package oa.hleast.xswl.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ActivityTypeEnum {

    /**
     * 所有
     */
    ALL(0),
    /**
     * 培训
     */
    TRAINING(1);

    private Integer code;

    public static ActivityTypeEnum getEnumByCode(int code) {
        for (ActivityTypeEnum value : ActivityTypeEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
